Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-64553] fix ItemListener not called after updating job via REST API or CLI #9304

Merged
merged 1 commit into from
May 27, 2024

Conversation

mawinter69
Copy link
Contributor

@mawinter69 mawinter69 commented May 24, 2024

when a job is updated via REST API or CLI, the
ItemListener.fireOnUpdated is now called to inform about the change.

See JENKINS-64553.

Testing done

added a Unit test that verifies ItemListener is called. Without the change the test fails.

Proposed changelog entries

  • Consistently notify job listeners when the job definition is updated from the REST API or command line interface.

Proposed upgrade guidelines

N/A

Submitter checklist

Before the changes are marked as ready-for-merge:

Maintainer checklist

when a job is updated via REST API or CLI, the
ItemListener.fireOnUpdated is now called to inform about the change.
@MarkEWaite
Copy link
Contributor

This PR is now ready for merge. We will merge it after approximately 24 hours if there is no negative feedback.

/label ready-for-merge

@comment-ops-bot comment-ops-bot bot added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label May 25, 2024
@mawinter69
Copy link
Contributor Author

@krisstern This might be a candidate for the next LTS 2.452.2

@krisstern
Copy link
Member

Hi @mawinter69,
Sure, let me add this to the backporting of LTS 2.452.2 soon.

@MarkEWaite MarkEWaite merged commit dae1737 into jenkinsci:master May 27, 2024
16 checks passed
krisstern pushed a commit to krisstern/jenkins that referenced this pull request May 28, 2024
…ST API or CLI (jenkinsci#9304)

[JENKINS-64553] call ItemListener after updating job via cli

when a job is updated via REST API or CLI, the
ItemListener.fireOnUpdated is now called to inform about the change.

(cherry picked from commit dae1737)
@jglick
Copy link
Member

jglick commented Aug 7, 2024

Note: this does not suffice for onUpdated to be called from other code that happens to save a Job (e.g., adding/removing JobPropertys). Perhaps the existing fireOnUpdated call sites should be deleted and replaced with one call from

SaveableListener.fireOnChange(this, getConfigFile());
regardless of the save’s origin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For changelog: Minor bug. Will be listed after features ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants